<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>pay</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../themes/jquery.mobile.icons.min.css" />
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/mobile.css" />
    <link rel="stylesheet" href="../themes/orange.min.css" />
  
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-1.11.3.min.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-migrate-1.2.1.min.js"></script>
    <script src="http://wanjia.mcooz.com/views/mobile_basic/javascript/mobile.js"></script>
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/index.css" />
      <link href="../font/css/font-awesome.css" rel="stylesheet">

        <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/form/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/validate.js"></script>
    <link rel="stylesheet" type="text/css" href="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/style.css" />
     <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/main.js"></script>

<style>
#header ul li.active {
  display: block;
}
#header ul li {
  color: #fff;
  display: none;
  font-size: 18px;
  height: 40px;
  line-height: 40px;
  position: relative;
  text-align: center;
}
#header ul li.active {
  display: block;
}
    .blue{color:#ff7700;}
    .pdt20{padding-top: 20px;}
   #Home {
  background: #EEE;
}
.mgt20{
    margin-top: 20px;
}
.border-t, .border-b {
  position: relative;
}
#target{
     display: block;
}
</style>

</head>

<body>

<div data-role="page"   class="content">
  <div data-role="header" id="header" class="kros_header" data-position="fixed">
        <a href="#kros_panel" id="back" data-rel="back" class="ui-btn-left ui-btn-corner-all ui-btn ui-icon-home ui-btn-icon-notext ui-shadow">Back</a>
        <a href="#" onclick="goToPage('search.html');" id="search" data-ajax="false" class="ui-btn ui-btn-letf  ui-btn-corner-all ui-btn-icon-notext  ui-icon-search ui-shadow">search</a>
        <ul>
            <li class="border-b active" >充值</li>
           
            </ul>
        </div>

<div role="main" id="target">
    <div class="kros_content ">

   
        <ul data-role="listview" data-theme="b" class="kros_view">
           
            <li><a href="#" onclick="pay(10)" data-transition="flow" data-ajax="false"><i class="fa fa-money mgr6 blue"></i>充值10</a></li>
            <li><a href="#"  onclick="pay(60)"  data-transition="flow" data-ajax="false"><i class="fa fa-money mgr6 blue"></i>充值60</a></li>
            <li><a href="#" onclick="pay(100)" data-transition="flow" data-ajax="false"><i class="fa fa-money mgr6 blue"></i>充值100</a></li>
            <li><a href="#" onclick="pay(600)" data-transition="flow" data-ajax="false"><i class="fa fa-money mgr6 blue"></i>充值600</a></li>
            <li><a href="#" onclick="pay(6000)" data-transition="flow" data-ajax="false"><i class="fa fa-money mgr6 blue"></i>充值6000</a></li>

          
       
        </ul>

   
    </div>
</div>
    </div>

   

</body>
</html>
<script>
apiready = function(){

var winWidth = api.winWidth;
var winHeight = api.winHeight;


$(".content").css({ width:winWidth,height:winHeight});
var header = $api.byId('header');
$api.fixStatusBar(header);
var  top=$api.dom('.border-b').offsetTop+3;
$("#back,#search").css({ top:top});
var  height=$api.dom('#header').offsetHeight+3;
$("#target").css({ marginTop:top-3});
}

function pay(money){

   userArr= $api.getStorage('userArr');

        if (userArr) {

  var aliPay = api.require('aliPay');
aliPay.payOrder({
    orderInfo: 'partner="2088101568358171"&seller_id="xxx@alipay.com"&out_trade_no="0819145412-6179"&subject="测试"&body="测试测试"&total_fee="0.01"&notify_url="http://notify.msp.hk/notify.htm"&service="mobile.securitypay.pay"&payment_type="1"&_input_charset="utf-8"&it_b_pay="30m"&sign="lBBK%2F0w5LOajrMrji7DUgEqNjIhQbidR13GovA5r3TgIbNqv231yC1NksLdw%2Ba3JnfHXoXuet6XNNHtn7VE%2BeCoRO1O%2BR1KugLrQEZMtG5jmJIe2pbjm%2F3kb%2FuGkpG%2BwYQYI51%2BhA3YBbvZHVQBYveBqK%2Bh8mUyb7GM1HxWs9k4%3D"&sign_type="RSA"'
}, function(ret, err) {
    api.alert({
        title: '支付结果',
        msg: ret.code,
        buttons: ['确定']
    });
});

  }
            else

            {
                      api.toast({
                    msg: '您尚未登录!',
                    duration:2000,
                    location: 'middle'
                        });
            }

}
</script>



